home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks ’89 / Gas Gauge / Windows / windows.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-06-15  |  1.9 KB  |  73 lines  |  [TEXT/KAHL]

  1. /*             Copyright (c) 1988 by Caldera Corporation                        */
  2.     
  3. /*            PO box 3252, Ann Arbor, MI 48106   (313) 996-9059                */
  4.  
  5. /*        File:         windows.h
  6.         Compilers:     LightSpeedC 3.0, Aztec C 3.0                            */
  7.  
  8. /*        Abstract:                                                            */
  9. /*            high level and code segment 1 routines for windows                */
  10.  
  11. /*        History:                                                            */
  12. /*            2/10/89 1.0d - released final 1.0 version                         */
  13.  
  14.  
  15. #define        APPLEMENU        5001            /* menu resource ID constants     */
  16. #define            appleABOUT        1
  17. #define        FILEMENU        5002
  18. #define            fileNEW            1
  19. #define            fileQUIT        10
  20. #define        EDITMENU        5003
  21. #define            editUNDO        1
  22. #define            editCUT            3
  23. #define            editCOPY        4
  24. #define            editPASTE        5
  25. #define            editSELECTALL    7
  26. #define        OPTIONMENU        5004
  27. #define            ADD_ITEM        1
  28. #define            NEW_WINDOW        2
  29. #define            NEW_BUTTON        4
  30. #define            NEW_CHECKBOX    5
  31. #define            NEW_RADIOBUTTON    6
  32. #define            DISP_DIALOG        8
  33. #define            DISP_MODELESS    9
  34. #define            DISP_ALERT        10
  35.  
  36. #define        MAXMENUS        4
  37.  
  38. #define        RESID_BASE        5000
  39.  
  40. #define        MAXWINDOWS        10        /* for global window record array dim    */
  41.  
  42. extern MenuHandle    menuHdls[MAXMENUS+1];    /* external global variables    */
  43. extern WindowRecord    wRecs[MAXWINDOWS];
  44. extern WindowPtr    wPtrs[MAXWINDOWS];
  45.  
  46. extern Boolean        done;                              /*    quit program flag    */
  47. extern EventRecord    myEvent;                           /*    app event record    */
  48.  
  49. extern Rect            dragRect;                        /* drag window bounds    */
  50. extern Rect            limitRect;                        /* resize window bounds    */
  51.  
  52. void         Init_all( void );
  53. void         Set_up_menus( void );
  54.  
  55. OSErr        DoAppleCmds( int );
  56. OSErr        DoFileCmds( int );
  57. OSErr        DoEditCmds( int );
  58. OSErr        DoOptionCmds( int );
  59. OSErr         Dispatch ( long    );
  60.  
  61. void         DoKey( long, int );
  62. OSErr         DoUpdate( WindowPtr );
  63. OSErr         DoActivate ( WindowPtr );
  64. OSErr         DoMouseDown ( Point );
  65.  
  66. void        main ( void );
  67. void        DeAllocWindow( WindowPtr );
  68. WindowPtr    AllocWindow( void );
  69. Boolean     HasGrow( WindowPtr );
  70. void         SetGrow( WindowPtr, Boolean );
  71. pascal void    MyTracker ( ControlHandle, int );
  72.  
  73.